﻿// -------------------------------------------------------------------------
//    @FileName         :    NFTransGetRoleList.h
//    @Author           :    gaoyi
//    @Date             :    24-8-13
//    @Email            :    445267987@qq.com
//    @Module           :    NFTransGetRoleList
//
// -------------------------------------------------------------------------

#pragma once

#include "NFTransAccBase.h"
#include "NFComm/NFObjCommon/NFObject.h"

namespace proto_ff
{
    class Proto_OnLine2ZoneLoginRes;
}

class NFTransGetRoleList : public NF_OBJECT_TEMPLATE_MACRO(NFTransGetRoleList, EOT_TRANS_LOGIC_GET_ROLELIST, NFTransAccBase)
public:
    NFTransGetRoleList();

    ~NFTransGetRoleList() override;

    int CreateInit();

    int ResumeInit();

public:
    int HandleCSMsgReq(const google::protobuf::Message *pCSMsgReq) override;
    int OnTransFinished(int iRunLogicRetCode) override;
    int OnAccLoginSuccess(const proto_ff::Proto_OnLine2ZoneLoginRes& res);
    int HandleDispSvrRes(uint32_t nMsgId, const NFDataPackage& packet, uint32_t reqTransId, uint32_t rspTransId) override;
    int OnHandleAccLoginRes(uint32_t nMsgId, const NFDataPackage& packet, uint32_t reqTransId, uint32_t rspTransId);
    int NotifyClientRoleList(NFSession* pSession, const proto_ff::Proto_OnLine2ZoneLoginRes& res, uint64_t roleId);
public:
    int GetCacheDataRes(int ullId, int iTableId, int iReason, int32_t errCode, google::protobuf::Message* pMessage) override;
};
